
#include <mutex>
class mtx
{
private:
    std::mutex mu;
public:
   mtx()
    {
        mu.lock();
    }

   ~mtx()
    {
        mu.unlock();
    }
};